//Add a event to open the dropdown menu every time the user hovers over the item.
function addHoverEvent(){
	$(".dropdown").mouseenter(function(){
		$(this).addClass("open");
	});

	$(".dropdown").mouseleave(function(){
		$(this).removeClass("open");
	});
}

//Add a event to open the menuitem on the index page every time the user hovers over the item.
function addMenuHover(){
	$menuitems = $(".f-menu  ul li .f-menuItem");
	$menuitems.mouseenter(function(){
		$(this).animate({'marginTop':-40},250);
		$(this).find(".f-titleContainer .f-image").animate({'height':100},250);
		$(this).find(".f-subText").slideDown(250);
		$(this).find(".f-subMenu").slideDown(250);
	});

	$menuitems.mouseleave(function(){
		$(this).animate({'marginTop':0},250);
		$(this).find(".f-titleContainer .f-image").animate({'height':51},250);
		$(this).find(".f-subText").slideUp(250);
		$(this).find(".f-subMenu").slideUp(250);
	});
}

//Adjsting heigth for grid system
function gridHeight(){
	
	$('.f-grid-heigth').each(function(){
		var parentHeight = $(this).parent().height();
		$(this).height(parentHeight-40);    
	});

}

//Setting css when cliking on a fruit product from main menu
function productBlockUrlCss(){
	window.location.href("lapija");
}